#include "../inc/match.h"

Match::Match()
{
    score1=0;
    score2=0;
}

Match::Match(int pM)
{
    pointMax=pM;
    score1=0;
    score2=0;
}

void Match::ajout1(int nb_point)
{
    score1+=nb_point;
}

void Match::ajout2(int nb_point)
{
    score2+=nb_point;
}

int Match::getscore1()
{
    return score1;
}

int Match::getscore2()
{
    return score2;
}

int Match::gagner()
{
    if(score1==pointMax)
        return 1;
    else if(score2==pointMax)
        return 2;
    return 0;
}

void Match::remiseAZero()
{
    score1=0;
    score2=0;
}
